<?php
class Site_Form_SiteCopy extends Promotor_Form_Scaffold {

	public function init() {
		$this->setMethod('post');
		$this->setAttrib('enctype', Zend_Form::ENCTYPE_MULTIPART);

		$this->addPrefixPath('Promotor_Form_Decorator_','Promotor/Form/Decorator', self::DECORATOR);

        $subForm = $this->_getMoveForm();
        $this->addSubForm($subForm, 'copytab');
	}

	/**
     * @return Zend_Dojo_Form_SubForm
     */
	protected function _getMoveForm() {
    	$subForm = new Zend_Form_SubForm();
        $subForm->setAttribs(array(
            'legend' => 'Kopiowanie zaznaczonych stron',
        ));

        $subForm
        	->addElement('text','locale', array(
        		'label' => 'Nazwa nowej lokalizacji',
        		'description' => 'Nazwa lokalizacji powaninna być zgodna z oznaczeniem ISO, np.: pl, pl_PL',
        		'required'  => true,
        		'filters' => array(
                		'strtrim' => new Zend_Filter_StringTrim(),
                		'strtolower' => new Zend_Filter_StringToLower(),
                		'rewrite' => new KontorX_Filter_Word_Rewrite(),
        				new Zend_Filter_Word_SeparatorToDash()
                	)));

        return $subForm;
    }
}